# 电影各信息的注册放这里。不想写了，直接抄前锋的

"""
insert into movies(id, showname, shownameen, director, leadingRole, type, country, language, duration,
screeningmodel, openday, backgroundpicture, flag, isdelete) values(228830,"梭哈人生","The Drifting Red Balloon",
"郑来志","谭佑铭,施予斐,赵韩樱子,孟智超,李林轩","剧情,爱情,喜剧","中国大陆","汉语普通话",90,"4D",date("2018-01-30 00:00:00"),
"i1/TB19_XCoLDH8KJjy1XcXXcpdXXa_.jpg",1,0);

"""
from App.ext import db
from App.models import BaseModel


class Movie(BaseModel):
    __tablename__ = "movies"
    showname = db.Column(db.String(64))             # 名字
    shownameen = db.Column(db.String(128))          # 英文名
    director = db.Column(db.String(64))             # 导演
    leadingRole = db.Column(db.String(256))         # 主演
    type = db.Column(db.String(64))                 # 类型（喜剧、恐怖、剧情）
    country = db.Column(db.String(64))              # 国家
    language = db.Column(db.String(64))             # 语言
    duration = db.Column(db.Integer, default=90)    # 电影时长
    screeningmodel = db.Column(db.String(32))       # 2D、3D等？
    openday = db.Column(db.DateTime)                # 开幕时间
    backgroundpicture = db.Column(db.String(256))   # 电影背景图
    flag = db.Column(db.Boolean, default=False)     # 标志（推荐 、热门）
    is_delete = db.Column(db.Boolean, default=False)# 逻辑删除

    # hall_movies = db.relationship('HallMovie', backref='Movie', lazy=True)